/*
 * @(#)TransferWord.java 1.0 3/30/06
 *
 * 
 * Made by LEFT thesis group
 * 
 * Transfer dictionary Module
 * 
 * The TransferWord class is the format of each entry in the word list of the transfer dictionary
 * Both for english and filipino
 */
package org.dlsu.mt.parser.TRANSFER;
import java.util.Vector;

public class TransferWord{

	private final String id; //id of the transfer word
	private final String word; //the word itself
	private final String POS; // tells which part of speech the word belongs to
	private final char lang; // tells if the word is English or Filipino
		
	private Vector posTranslations; // contains the id of the possible translations of the word
	//points to the possible translation of the word
	
	
	//constructor that will create a transfer word with complete information
	public TransferWord(String word, String POS, char lang, String id){
		
		this.word = word;
		this.POS = POS;
		this.lang = lang;
		this.id = id;
		
		posTranslations = new Vector();
		//for trial purposes
		//System.out.print(this.word + " ");
		//System.out.println(this.id);
	}
	
	
	//inserts a String id into the vector of posTranslations
	public void addPosTranslation(String transId){
				
		posTranslations.add(transId);
		//System.out.println(posTranslations.size());
	}
	
	//returns an array of String id of the possible translations
	public String[] getPosTranslation(){
		
		
		String arr[] = new String[posTranslations.size()];
		for(int i = 0; i < posTranslations.size(); i++){
			arr[i] = (String)posTranslations.get(i);
		}
		
		return arr;
	}
	
	//returns the size of the vector that holds the possible translations
	public int getSizeofPosTranslations(){
		return posTranslations.size();
	}
	
	//returns the word
	public String getWord(){
		//System.out.println(word);
		return word;
	}
	
	//returns the id
	public String getTransferWordId(){
		return id;
	}
	
}